import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import axios from "axios";


//带上token
axios.interceptors.request.use(config=>{
  config.headers.token = window.sessionStorage.getItem("token");
  return config;
});

Vue.prototype.$ajax = axios;






Vue.config.productionTip = false

import Router from 'vue-router';
//路由导航冗余报错（路由重复）
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
